package com.integrate.kafka.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 刘志强
 * @date 2020/11/13 13:50
 */

@Configuration
public class KafkaConfiguration {
    @Bean(name = "test_01")
    public NewTopic initialTopic() {
        return new NewTopic(KafkaTopic.NAME,KafkaTopic.NUM_PARTITIONS, KafkaTopic.REPLICATION_FACTOR);
    }

}
